package com.itheima.spring.config;

import com.itheima.spring.service.CourseService;
import com.itheima.spring.service.QuestionService;
import com.itheima.spring.service.TestImportClass;
import com.itheima.spring.spring.HmImportBeanDefinitionRegistrar;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.springframework.context.annotation.*;
import org.springframework.jdbc.datasource.DriverManagerDataSource;


import javax.sql.DataSource;


/**
 * @author ：sean
 * @date ：Created in 2020/6/19
 * @description ：
 * @version: 1.0
 */
@Configuration
@ComponentScan("com.itheima.spring")
@Import({TestImportClass.class, HmImportBeanDefinitionRegistrar.class})
public class HmConfig {
	public HmConfig(){
		System.out.println("HmConfig()...");
	}

	@Bean
	public CourseService courseService(){
		System.out.println("HmConfig courseService...");
		return new CourseService();
	}


}
